package com.tang.model.builder;

import java.math.BigDecimal;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/16 7:06
 * @Desc 构建者模式：用于构建复杂的对象，重视构建过程，构建结果确定
 * @Remarks
 */
public class BuilderTest {
    public static void main(String[] args) {
        TPhoneBuilder tPhoneBuilder = new TPhoneBuilder();
        tPhoneBuilder.setBrand("xiaomi").
                setId(1001L).
                setPrice(new BigDecimal(1000.00)).
                setType("note10");
        TPhone build = tPhoneBuilder.build();
        System.out.println(build);
    }
}
